﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

using IronOne.SalesOne.BusinessObjects;
using IronOne.SalesOne.DataObjects;

namespace Facade
{
    public class BranchFacade
    {
        LinqBranch linqBranch = new LinqBranch();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public Branch GetBranch(int BranchID)
        {
            return linqBranch.GetBranch(BranchID);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<Branch> GetBranches(string sortExpression)
        {
            return linqBranch.GetBranches(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertMessage(Branch branch)
        {
            linqBranch.InsertBranch(branch);
        }
    }
}
